<{include file="Public/top.html" }>

</head>
<body>
<div id="warpper">
    <div class="content">
        <div class="location">模块管理</div>
        <div class="ui-tab">
            <ul>
                <li class="tab-item selected"><a href="<{U('SysNode/index')}>" onclick="LayerShow();">模块列表</a></li>
                <li class="tab-item last-item"><a href="<{U('SysNode/add')}>" onclick="LayerShow();">新增模块</a></li>
            </ul>
        </div>
        <div class="filedSet" style="padding-bottom: 0;">
            <div class="search">
                <form action="<{u('SysNode/search')}>" method="get" class="ui-form reportForm" id="searchForm">
                	<input name="m" type="hidden" value="<{$module}>">
                    <input name="c" type="hidden" value="<{$controller}>">
                    <input name="a" type="hidden" value="search">
                    <input name="p" id="page" type="hidden" value="<{$page|default:1}>">
                    <input name="limit" id="limit" type="hidden" value="<{$limit|default:10}>">
                    <div class="ui-form-item inline-block">
                        <label class="ui-label">状态</label>
                        <select class="ui-select">
                        	<option>全部</option>
                        </select>
                    </div>
                    <div class="ui-form-item inline-block">
                        <label class="ui-label">编号</label>
                        <input type="text" name="id" class="ui-text bg-text keyword" value="<{$id}>" />
                    </div>
                    <div class="ui-form-item inline-block">
                        <label class="ui-label">关键字</label>
                        <input type="text" class="ui-text bg-text keyword" value="<{$keywords}>" name="keywords"/>
                    </div>
                    <div class="ui-form-item inline-block">
                        <button type="submit" class="ui-button" onclick="LayerShow();">查询</button>
                        <{if $powerPush }>
                        <button type="button" id="pushCenter" class="ui-button" onclick="LayerShow();">推送到中心库</button>
                        <{/if}>
                    </div>
                </form>
            </div>
        </div> 
        <!--表格内容-->
        <div class="mainGrid">
            <table class="ui-table ui-body">
                <thead>
                    <tr>
                        <th class="pct10">编号</th>
                        <th class="pct10">标题</th>
                        <th class="pct10">名称</th>
                        <th class="pct10">父级</th>
                        <th class="pct10">级别</th>
                        <th class="pct10">路径</th>
                        <th class="pct10">状态</th>
                        <th class="pct10">排序</th>
                        <th class="pct10 last-col">操作</th>
                    </tr>
                </thead>
                <tbody>
                <{foreach from="$list" item="vo"}>
                    <tr>
                        <td><{$vo.id}></td>
						<td><{$vo.title}></td>
						<td><{$vo.name}></td>
						<td><{$vo.parent}></td>
						<td><{$vo.level}></td>
						<td><{$vo.path}></td>
						<td><{$vo.status}></td>
						<td><{$vo.sort}></td>
                        <td>
                            <div class="handler">
                                <a href="<{u('SysNode/edit?id='|cat:$vo['id'])}>" onclick="LayerShow();">编辑</a>
                                <span class="sep">|</span>
                                <a href="<{u('SysNode/delete?id='|cat:$vo['id'])}> " onclick="if(!confirm('您确认要删除此数据吗?删除后数据不能恢复!'))return false;">删除</a>
                            </div>
                        </td>
                    </tr> 
                <{/foreach}>
                </tbody>
            </table>
        </div>
        <!--描述：分页-->
        <div class="pagination">
            <{include file="Public/page.html"}>
        </div>
    </div>
		</div>
<script>
    $('#pushCenter').click(function(){
        $.getJSON("<{u('pushMenuToCenter')}>",function(result){
            parent.closeLoading();
            if(result.status==0){
                layer.msg('权限项已经成功推送到中心库');
            }else{
                layer.msg(result.msg);
            }

        });
    });


</script>
<{include file="Public/foot.html" }>